RtAllocateLockedMemory

RtAllocateLockedMemory commits and locks the specified amount of memory to avoid page faults as the memory is used.

NOTE: This function is no longer exported to Windows applications.

Syntax

PVOID RtAllocateLockedMemory(
    UINT nNumberOfBytes
);

Parameters

nNumberOfBytes

An unsigned integer specifying the number of bytes to allocate, commit, and lock.

Return Value

A pointer to the allocated memory if the function succeeds, a NULL pointer if the function fails

Remarks

RtAllocateLockedMemory allocates memory in the virtual address space of the process, commits that space to physical memory, and locks that physical memory. The committed locked memory will not incur page faults when the memory is used, nor will the system page the allocated memory out to secondary storage.

Requirements

Header RtssApi.h
Library Rtx_Rtss.lib

See Also:

RtFreeLockedMemory